<?php
require_once("pointtypeView.php");
require_once(CORE_DIR.'pointtypeModel.php');

class getAction extends authAction{

	function __construct(){
		$this->view = new pointtypeView();
	}

	public function run($get, $post, $viewtype) {
		parent::run($get,$post,$viewtype);
		
		$ptModel = new pointtypeModel();	 	
		
		if (isset($get["id"]))
		{
			$id = $get["id"];
			$pointTypes = $ptModel->getPointTypesById($id);
		}
		else
		{
			$pointTypes = $ptModel->getPointTypes();
		}
		
		$this->view->setProperty("pointTypes", $pointTypes);
		$this->view->showGetPointTypes();
			
	}
}
?>